Skip to content

Conversation

EwanTauran
Copy link
Contributor

@EwanTauran EwanTauran commented Oct 16, 2025

Overview

Adds integration for Airweave, an open-source platform that makes any app searchable for agents by syncing data from various sources with minimal configuration.

What's Added

App Configuration

  • airweave.app.mjs - Main app with SDK integration
  • Authentication via API key with optional custom base URL
  • Dynamic dropdown prop definitions for collections and source connections
  • Reusable methods wrapping the @airweave/sdk

Actions (7 total)

Collections

  1. Search Collection - Semantic and keyword search across all data sources in a collection

    • Supports pagination, recency bias, and response types (results/completion)
    • Primary use case for AI agents and Q&A workflows
  2. List Collections - Get all collections with pagination

  3. Create Collection - Create new collection with name and readable ID

  4. Get Collection - Retrieve specific collection details

  5. Delete Collection - Remove collection with confirmation safety check

Sources & Syncing

  1. List Sources - View all available data source connectors

  2. Trigger Sync - Manually trigger data synchronization for source connections

Authentication

Uses API key authentication:

  • api_key (required, secret) - Airweave API key from dashboard
  • base_url (optional) - Custom base URL for self-hosted instances (default: https://api.airweave.ai)

Example Use Cases

  • Slack Q&A Bot: Slash command → Search Airweave → Reply with context
  • Support Automation: Form submission → Search docs → Create ticket with relevant info
  • Daily Digest: Cron schedule → Search updates → Email summary
  • GitHub Auto-comment: New issue → Search codebase → Comment with relevant code

Dependencies

  • @airweave/sdk@^0.1.50 - Official Airweave TypeScript SDK
  • @pipedream/platform@^3.0.3 - Pipedream platform utilities

Testing

Tested manually in Pipedream workflows:

  • SDK imports correctly
  • Authentication works with API key
  • Search returns expected results
  • Dynamic dropdowns populate collections

Documentation

  • Comprehensive README with setup instructions and workflow examples
  • All actions include descriptions and documentation links
  • Prop definitions have clear labels and helpful descriptions

Links

Summary by CodeRabbit

  • New Features

    • Airweave integration: create, retrieve, list, update, and delete collections; semantic and keyword search with configurable query, limits, response type and recency bias; list and manage sources and source connections; trigger manual syncs and query/cancel sync jobs; UI helpers for selecting collections and connections.
  • Documentation

    • Added comprehensive Airweave README with setup, authentication, example workflows, available actions, and support links.
  • Chores

    • Package bumped to version 0.1.0.

…nagement.

- Search Collection: semantic + keyword search across data sources
- List/Create/Get/Delete Collections
- List Available Sources
- Trigger Source Connection Sync

Includes full @airweave/sdk integration, dynamic dropdowns, and comprehensive documentation.
@adolfo-pd adolfo-pd added the User submitted Submitted by a user label Oct 16, 2025
Copy link

vercel bot commented Oct 16, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
pipedream-docs-redirect-do-not-edit Ignored Ignored Oct 21, 2025 5:59pm

@pipedream-component-development
Copy link
Collaborator

Thank you so much for submitting this! We've added it to our backlog to review, and our team has been notified.

@pipedream-component-development
Copy link
Collaborator

Thanks for submitting this PR! When we review PRs, we follow the Pipedream component guidelines. If you're not familiar, here's a quick checklist:

Copy link
Contributor

coderabbitai bot commented Oct 16, 2025

Walkthrough

Adds an Airweave integration comprising a new app module (Airweave SDK client, propDefinitions, and API methods), seven action modules for collections and sources, README documentation, and package metadata with new dependencies. All changes are additive under components/airweave.

Changes

Cohort / File(s) Summary
Documentation & Package
components/airweave/README.md, components/airweave/package.json
New README; package.json bumped to 0.1.0, adds @airweave/sdk and @pipedream/platform, and updates keywords.
Core App Module
components/airweave/airweave.app.mjs
New app exposing propDefinitions (async options for collectionId, sourceConnectionId, search config), auth helpers, _client factory using AirweaveSDKClient, and methods for collections, source connections, and sources delegating to the SDK (list/get/create/update/delete/search/run/cancel/jobs).
Collection Actions
components/airweave/actions/search-collection/search-collection.mjs, components/airweave/actions/create-collection/create-collection.mjs, components/airweave/actions/get-collection/get-collection.mjs, components/airweave/actions/list-collections/list-collections.mjs, components/airweave/actions/delete-collection/delete-collection.mjs
New action modules: Search Collection (params incl. responseType, recencyBias), Create Collection, Get Collection, List Collections (skip/limit), Delete Collection (requires typed confirmation). Each action calls the app methods, exports a summary, and returns the API response.
Source Actions
components/airweave/actions/list-sources/list-sources.mjs, components/airweave/actions/trigger-sync/trigger-sync.mjs
New actions: List Sources and Trigger Source Connection Sync (invokes runSourceConnection and returns job id/status).

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant Action as Action Module
  participant App as Airweave App
  participant SDK as Airweave SDK/API

  rect rgba(232,246,255,0.9)
  User->>Action: Invoke action (Create / Search / List / Get / Delete / Trigger Sync)
  end

  Action->>App: call corresponding method (e.g., createCollection, searchCollection, runSourceConnection)
  App->>SDK: instantiate client & call SDK endpoint (client.collections / client.sourceConnections / client.sources)
  SDK-->>App: return API response
  App-->>Action: return response
  Action-->>User: export summary and return response
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Poem

🐇 I hopped through files with nimble paws,

Wired the SDK and read the laws,
Collections hum, sources sing in sync,
Docs and actions—ready in a blink,
🥕 A rabbit cheers: "Deploy, don't blink!"

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed The PR title "Add Airweave app" directly and clearly describes the primary change in the changeset. The pull request introduces a new Airweave integration to Pipedream, including the main app module, seven actions, documentation, and dependencies—all of which the title accurately captures at a high level. The title is concise, specific enough for a teammate to understand the primary change when scanning history, and contains no misleading or off-topic content. While it doesn't enumerate every detail like individual actions, that level of granularity is not expected for a PR title.
Description Check ✅ Passed The PR description substantially exceeds the minimal template requirement of a "## WHY" section. While the description doesn't include that exact heading, it provides comprehensive content that answers why this integration is valuable: the Overview explains Airweave's purpose (making apps searchable for agents), and the Example Use Cases demonstrate practical value. The description is well-organized with sections covering What's Added, Authentication, Dependencies, Testing, Documentation, and Links, providing far more detail than minimally required. The information is substantive, directly relevant to the changeset, and not vague or generic.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🧹 Nitpick comments (1)
components/airweave/package.json (1)

16-16: Update to the latest Airweave SDK version (0.6.46).

The dependency is currently pinned at @airweave/sdk@^0.1.50—upgrade to ^0.6.46 to gain recent bug fixes, improved runtime support, enhanced TypeScript types, retry behavior, and new helpers.

-    "@airweave/sdk": "^0.1.50",
+    "@airweave/sdk": "^0.6.46",

After upgrading, verify that all imports of AirweaveSDKClient and its method signatures still align with the new SDK.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 84fcc91 and 3d75d36.

📒 Files selected for processing (10)
  • components/airweave/README.md (1 hunks)
  • components/airweave/actions/create-collection/create-collection.mjs (1 hunks)
  • components/airweave/actions/delete-collection/delete-collection.mjs (1 hunks)
  • components/airweave/actions/get-collection/get-collection.mjs (1 hunks)
  • components/airweave/actions/list-collections/list-collections.mjs (1 hunks)
  • components/airweave/actions/list-sources/list-sources.mjs (1 hunks)
  • components/airweave/actions/search-collection/search-collection.mjs (1 hunks)
  • components/airweave/actions/trigger-sync/trigger-sync.mjs (1 hunks)
  • components/airweave/airweave.app.mjs (1 hunks)
  • components/airweave/package.json (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (8)
components/airweave/actions/trigger-sync/trigger-sync.mjs (6)
components/airweave/actions/create-collection/create-collection.mjs (1)
  • response (29-33)
components/airweave/actions/delete-collection/delete-collection.mjs (1)
  • response (28-28)
components/airweave/actions/get-collection/get-collection.mjs (1)
  • response (19-19)
components/airweave/actions/list-collections/list-collections.mjs (1)
  • response (30-33)
components/airweave/actions/list-sources/list-sources.mjs (1)
  • response (13-13)
components/airweave/actions/search-collection/search-collection.mjs (1)
  • response (65-68)
components/airweave/actions/list-collections/list-collections.mjs (1)
components/airweave/actions/list-sources/list-sources.mjs (2)
  • response (13-13)
  • count (15-15)
components/airweave/airweave.app.mjs (1)
components/airweave/actions/search-collection/search-collection.mjs (1)
  • params (51-55)
components/airweave/actions/search-collection/search-collection.mjs (2)
components/airweave/airweave.app.mjs (2)
  • params (12-15)
  • params (35-38)
components/airweave/actions/list-collections/list-collections.mjs (1)
  • response (30-33)
components/airweave/actions/list-sources/list-sources.mjs (1)
components/airweave/actions/list-collections/list-collections.mjs (2)
  • response (30-33)
  • count (35-35)
components/airweave/actions/create-collection/create-collection.mjs (3)
components/airweave/actions/delete-collection/delete-collection.mjs (1)
  • response (28-28)
components/airweave/actions/get-collection/get-collection.mjs (1)
  • response (19-19)
components/airweave/actions/list-collections/list-collections.mjs (1)
  • response (30-33)
components/airweave/actions/delete-collection/delete-collection.mjs (2)
components/airweave/actions/create-collection/create-collection.mjs (1)
  • response (29-33)
components/airweave/actions/get-collection/get-collection.mjs (1)
  • response (19-19)
components/airweave/actions/get-collection/get-collection.mjs (3)
components/airweave/actions/delete-collection/delete-collection.mjs (1)
  • response (28-28)
components/airweave/actions/list-collections/list-collections.mjs (1)
  • response (30-33)
components/airweave/actions/search-collection/search-collection.mjs (1)
  • response (65-68)
🪛 LanguageTool
components/airweave/README.md

[grammar] ~9-~9: There might be a mistake here.
Context: ...ocess data from: - API endpoints (REST) - Productivity and collaboration tools - R...

(QB_NEW_EN)


[grammar] ~10-~10: There might be a mistake here.
Context: ...) - Productivity and collaboration tools - Relational databases - Document stores -...

(QB_NEW_EN)


[grammar] ~11-~11: There might be a mistake here.
Context: ...llaboration tools - Relational databases - Document stores - File systems and stora...

(QB_NEW_EN)


[grammar] ~12-~12: There might be a mistake here.
Context: ...- Relational databases - Document stores - File systems and storage services ## Av...

(QB_NEW_EN)


[grammar] ~17-~17: There might be a mistake here.
Context: ...s ## Available Actions ### Collections - Search Collection - Search across all ...

(QB_NEW_EN)


[grammar] ~24-~24: There might be a mistake here.
Context: ...ion and all associated data ### Sources - List Sources - Get all available data ...

(QB_NEW_EN)


[grammar] ~36-~36: There might be a mistake here.
Context: ... ## Example Workflows ### Slack Q&A Bot Slash command → Search Airweave collecti...

(QB_NEW_EN)


[grammar] ~39-~39: There might be a mistake here.
Context: ...vant information ### Support Automation Form submission → Search documentation →...

(QB_NEW_EN)


[grammar] ~42-~42: There might be a mistake here.
Context: ...rt ticket with context ### Daily Digest Cron schedule → Search recent updates → ...

(QB_NEW_EN)


[grammar] ~45-~45: There might be a mistake here.
Context: ...nd email summary ### GitHub Integration New issue → Search codebase → Auto-comme...

(QB_NEW_EN)


[grammar] ~56-~56: There might be a mistake here.
Context: ...ce. ## Links - Airweave Documentation - [Airweave GitHub](https://github.com/airw...

(QB_NEW_EN)


[grammar] ~57-~57: There might be a mistake here.
Context: ...s://docs.airweave.ai) - Airweave GitHub - [API Reference](https://docs.airweave.ai/...

(QB_NEW_EN)


[grammar] ~58-~58: There might be a mistake here.
Context: ...m/airweave-ai/airweave) - API Reference - [Airweave TypeScript SDK](https://github....

(QB_NEW_EN)


[grammar] ~63-~63: There might be a mistake here.
Context: ...k) ## Support For issues or questions: - Airweave Community: [GitHub Discussions]...

(QB_NEW_EN)

🔇 Additional comments (8)
components/airweave/README.md (1)

1-66: LGTM! Well-structured documentation.

The README provides clear, comprehensive documentation for the Airweave integration with good setup instructions, example workflows, and helpful links. The static analysis grammar warnings are false positives—the tool is incorrectly flagging Markdown list items.

components/airweave/actions/list-sources/list-sources.mjs (1)

3-20: LGTM! Clean action implementation.

The action follows Pipedream conventions correctly with proper metadata, props, and a clear run method. The summary export provides useful feedback to users.

components/airweave/actions/get-collection/get-collection.mjs (1)

3-25: LGTM! Proper action structure.

The action correctly uses propDefinition for the collectionId and provides a clear summary with the collection name and readable_id.

components/airweave/actions/create-collection/create-collection.mjs (1)

3-39: LGTM! Well-documented action.

The action provides clear prop descriptions and appropriately warns users that the readableId cannot be changed after creation. The optional description field is properly handled.

components/airweave/actions/list-collections/list-collections.mjs (1)

3-40: LGTM! Good pagination implementation.

The action properly implements pagination with sensible defaults (skip: 0, limit: 50) and appropriate constraints (min/max values).

components/airweave/actions/trigger-sync/trigger-sync.mjs (1)

3-37: LGTM! Well-designed prop dependencies.

The action effectively uses the collectionId as context for the sourceConnectionId prop definition, which will appropriately filter the available source connections. The description clearly explains the asynchronous nature of the sync job.

components/airweave/actions/delete-collection/delete-collection.mjs (2)

23-26: LGTM! Appropriate safety mechanism.

The confirmation check is essential for this destructive operation. The validation logic correctly ensures users type "DELETE" before proceeding, and the error message is clear.


3-34: Well-implemented destructive action.

The action appropriately protects users from accidental deletion with multiple warnings (in the description and prop description) and a confirmation requirement. The implementation is clean and follows best practices for destructive operations.

Comment on lines +35 to +51
const params = {
skip: prevContext?.skip || 0,
limit: 50,
};
if (collectionId) {
params.collection = collectionId;
}
const connections = await this.listSourceConnections(params);
return {
options: connections.map((conn) => ({
label: conn.name || conn.id,
value: conn.id,
})),
context: {
skip: params.skip + connections.length,
},
};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Terminate pagination for source connections when no rows remain.

Same pagination issue here: if connections.length is zero, skip never advances and the UI will keep fetching the empty page. Bail out by omitting context (or returning null) once there are no more records.

-        return {
-          options: connections.map((conn) => ({
-            label: conn.name || conn.id,
-            value: conn.id,
-          })),
-          context: {
-            skip: params.skip + connections.length,
-          },
-        };
+        const options = connections.map((conn) => ({
+          label: conn.name || conn.id,
+          value: conn.id,
+        }));
+        return {
+          options,
+          context: options.length
+            ? { skip: params.skip + options.length }
+            : undefined,
+        };
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const params = {
skip: prevContext?.skip || 0,
limit: 50,
};
if (collectionId) {
params.collection = collectionId;
}
const connections = await this.listSourceConnections(params);
return {
options: connections.map((conn) => ({
label: conn.name || conn.id,
value: conn.id,
})),
context: {
skip: params.skip + connections.length,
},
};
const params = {
skip: prevContext?.skip || 0,
limit: 50,
};
if (collectionId) {
params.collection = collectionId;
}
const connections = await this.listSourceConnections(params);
const options = connections.map((conn) => ({
label: conn.name || conn.id,
value: conn.id,
}));
return {
options,
context: options.length
? { skip: params.skip + options.length }
: undefined,
};
🤖 Prompt for AI Agents
In components/airweave/airweave.app.mjs around lines 35 to 51, the pagination
always returns a context even when connections.length === 0 which causes the UI
to repeatedly fetch the same empty page; change the return so that if
connections.length is 0 you omit the context (or return null for context) to
signal termination of pagination, otherwise return the existing context with
skip: params.skip + connections.length.

@sergio-eliot-rodriguez
Copy link
Collaborator

Hi @EwanTauran ,

We released the base integration for Airweave. For logo I used the one in Airweave's Github profile. Feel free to provide or point to a better one if you'd like to.

Cheers,

@EwanTauran
Copy link
Contributor Author

Hi @EwanTauran ,

We released the base integration for Airweave. For logo I used the one in Airweave's Github profile. Feel free to provide or point to a better one if you'd like to.

Cheers,

That's great to hear, could you use

https://github.com/airweave-ai/airweave/blob/main/frontend/public/airweave-logo-blackbg-whitelogo.png

Thanks!

GTFalcao
GTFalcao previously approved these changes Oct 16, 2025
Copy link
Collaborator

@GTFalcao GTFalcao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, thanks for the contribution @EwanTauran !

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
components/airweave/actions/create-collection/create-collection.mjs (1)

14-32: Props are well-defined. Consider adding format validation for readableId.

The props follow best practices with clear descriptions. The description prop is appropriately optional. The readableId description explains the expected format (lowercase, hyphens), but there's no programmatic enforcement.

Optionally, you could add pattern validation to catch format issues early:

 readableId: {
   type: "string",
   label: "Readable ID",
   description: "URL-friendly identifier for the collection (lowercase, hyphens allowed, e.g., 'customer-support-data'). This cannot be changed after creation.",
+  pattern: "^[a-z0-9-]+$",
 },

This would provide immediate feedback if the format is invalid, rather than letting the API reject it.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b42c5a7 and 4aabdba.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (7)
  • components/airweave/actions/create-collection/create-collection.mjs (1 hunks)
  • components/airweave/actions/delete-collection/delete-collection.mjs (1 hunks)
  • components/airweave/actions/get-collection/get-collection.mjs (1 hunks)
  • components/airweave/actions/list-collections/list-collections.mjs (1 hunks)
  • components/airweave/actions/list-sources/list-sources.mjs (1 hunks)
  • components/airweave/actions/search-collection/search-collection.mjs (1 hunks)
  • components/airweave/actions/trigger-sync/trigger-sync.mjs (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (5)
  • components/airweave/actions/trigger-sync/trigger-sync.mjs
  • components/airweave/actions/search-collection/search-collection.mjs
  • components/airweave/actions/list-sources/list-sources.mjs
  • components/airweave/actions/delete-collection/delete-collection.mjs
  • components/airweave/actions/list-collections/list-collections.mjs
🧰 Additional context used
🧬 Code graph analysis (2)
components/airweave/actions/create-collection/create-collection.mjs (3)
components/airweave/actions/delete-collection/delete-collection.mjs (1)
  • response (33-33)
components/airweave/actions/get-collection/get-collection.mjs (1)
  • response (24-24)
components/airweave/actions/list-collections/list-collections.mjs (1)
  • response (35-38)
components/airweave/actions/get-collection/get-collection.mjs (3)
components/airweave/actions/create-collection/create-collection.mjs (1)
  • response (34-38)
components/airweave/actions/delete-collection/delete-collection.mjs (1)
  • response (33-33)
components/airweave/actions/search-collection/search-collection.mjs (1)
  • response (70-73)
🔇 Additional comments (5)
components/airweave/actions/create-collection/create-collection.mjs (2)

1-12: LGTM! Metadata and annotations are well-configured.

The component metadata follows Pipedream conventions with an appropriate key, clear description with documentation link, and correct annotation hints for a create operation.


33-43: LGTM! The run method is correctly implemented.

The method properly invokes the SDK, converts prop naming from camelCase to snake_case for the API, exports a clear summary message, and returns the response object for downstream use.

components/airweave/actions/get-collection/get-collection.mjs (3)

1-12: LGTM! Metadata and annotations are correctly configured.

The component metadata follows conventions with an appropriate key, clear description, and correct annotation hints. Notably, readOnlyHint: true accurately reflects this is a read-only GET operation.


14-22: Excellent use of propDefinition for reusability.

The action correctly uses propDefinition to reference the collectionId prop from the app module, which promotes code reuse and enables dynamic dropdown functionality across multiple actions.


23-29: LGTM! Clean and correct implementation.

The method correctly retrieves the collection, exports an informative summary, and returns the full response object. The implementation is consistent with other collection actions in this PR.

@vunguyenhung vunguyenhung moved this from Ready for QA to Ready for Release in Component (Source and Action) Backlog Oct 17, 2025
@vunguyenhung
Copy link
Collaborator

Hi everyone, all test cases are passed! Ready for release!

Test report
https://vunguyenhung.notion.site/Add-Airweave-app-28ebf548bb5e81aeb195ef4d440e0ace

- Added frameworkName and frameworkVersion properties to the AirweaveSDKClient instantiation.
- Imported package.json to dynamically set the framework version.
@EwanTauran
Copy link
Contributor Author

Made another small change adding in some headers that we consume on our side to make sure we can identify any traffic originating from Pipedream. Rest seems ready to go.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

♻️ Duplicate comments (2)
components/airweave/airweave.app.mjs (2)

12-26: Stop paginating when no more collections are returned.

If collections.length === 0, skip doesn’t advance and the UI keeps requesting the same empty page. Omit context when no options remain.

-        return {
-          options: collections.map((collection) => ({
-            label: collection.name || collection.readable_id,
-            value: collection.readable_id,
-          })),
-          context: {
-            skip: params.skip + collections.length,
-          },
-        };
+        const options = collections.map((collection) => ({
+          label: collection.name || collection.readable_id,
+          value: collection.readable_id,
+        }));
+        return {
+          options,
+          context: options.length
+            ? { skip: params.skip + options.length }
+            : undefined,
+        };

33-52: Terminate pagination for source connections when no rows remain.

Same issue as above: return no context when the page is empty to stop infinite requests.

-        return {
-          options: connections.map((conn) => ({
-            label: conn.name || conn.id,
-            value: conn.id,
-          })),
-          context: {
-            skip: params.skip + connections.length,
-          },
-        };
+        const options = connections.map((conn) => ({
+          label: conn.name || conn.id,
+          value: conn.id,
+        }));
+        return {
+          options,
+          context: options.length
+            ? { skip: params.skip + options.length }
+            : undefined,
+        };
🧹 Nitpick comments (3)
components/airweave/airweave.app.mjs (3)

2-2: Avoid JSON import assertions to satisfy Biome and maximize runtime compatibility.

Static analysis flags a parse error on the JSON import. Replace it with createRequire and pass a guarded frameworkVersion.

-import packageJson from "./package.json" assert { type: "json" };
+import { createRequire } from "module";
+const require = createRequire(import.meta.url);
+let frameworkVersion = "unknown";
+try {
+  frameworkVersion = require("./package.json")?.version || frameworkVersion;
+} catch {
+  // package.json may be pruned at runtime; fall back gracefully
+}

And update the client construction below:

-        frameworkVersion: packageJson.version,
+        frameworkVersion,

94-101: Minor: memoize the SDK client to avoid rebuilding per call (optional).

Tiny perf win and less object churn; rebuild only if auth/baseUrl changes.

-    _client() {
-      return new AirweaveSDKClient({
+    _client() {
+      if (this._cachedClient) return this._cachedClient;
+      this._cachedClient = new AirweaveSDKClient({
         apiKey: this._apiKey(),
         baseUrl: this._baseUrl(),
         frameworkName: "pipedream",
-        frameworkVersion: packageJson.version,
+        frameworkVersion,
       });
+      return this._cachedClient;
     },

103-176: Style nit: drop redundant await in return await client.* methods.

return await adds no value here and slightly harms stack traces. Consider returning the promise directly across these methods.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4aabdba and 2725457.

📒 Files selected for processing (1)
  • components/airweave/airweave.app.mjs (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
components/airweave/airweave.app.mjs (1)
components/airweave/actions/search-collection/search-collection.mjs (1)
  • params (56-60)
🪛 Biome (2.1.2)
components/airweave/airweave.app.mjs

[error] 2-2: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 2-2: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)

🔇 Additional comments (1)
components/airweave/airweave.app.mjs (1)

55-68: No action required – offset prop is properly defined.

The offset prop is defined in the search-collection action (lines 40–42) with type "integer" and label "Offset", and is correctly used via this.offset at line 59. The prop is appropriately defined within the action itself rather than the main app's shared propDefinitions, which is a valid pattern.

@EwanTauran EwanTauran requested a review from GTFalcao October 17, 2025 15:50
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

♻️ Duplicate comments (2)
components/airweave/airweave.app.mjs (2)

17-25: End pagination when no more collections are returned.

Empty pages currently repeat forever because context.skip doesn’t advance when collections.length === 0. Return no context when there are no options.

-        return {
-          options: collections.map((collection) => ({
-            label: collection.name || collection.readable_id,
-            value: collection.readable_id,
-          })),
-          context: {
-            skip: params.skip + collections.length,
-          },
-        };
+        const options = collections.map((collection) => ({
+          label: collection.name || collection.readable_id,
+          value: collection.readable_id,
+        }));
+        return {
+          options,
+          context: options.length
+            ? { skip: params.skip + options.length }
+            : undefined,
+        };

43-51: Terminate pagination for source connections on empty page.

Same issue: empty results loop indefinitely. Omit context when there are no options.

-        return {
-          options: connections.map((conn) => ({
-            label: conn.name || conn.id,
-            value: conn.id,
-          })),
-          context: {
-            skip: params.skip + connections.length,
-          },
-        };
+        const options = connections.map((conn) => ({
+          label: conn.name || conn.id,
+          value: conn.id,
+        }));
+        return {
+          options,
+          context: options.length
+            ? { skip: params.skip + options.length }
+            : undefined,
+        };
🧹 Nitpick comments (3)
components/airweave/airweave.app.mjs (3)

86-176: Add concise JSDoc for public methods.

Document params and returns for app methods to align with Pipedream component guidelines.

As per coding guidelines.


93-100: Optional: avoid version drift.

Define a single const FRAMEWORK_VERSION = "0.1.0" (or read from package.json) and reuse it in _client().


11-53: Optional: DRY pagination return logic.

Extract a tiny helper to build { options, context } to reuse across option builders.

+  methods: {
+    _optionsPage(options, skip, pageSize) {
+      return {
+        options,
+        context: options.length ? { skip: skip + options.length } : undefined,
+      };
+    },
-      async options({ prevContext }) {
+      async options({ prevContext }) {
         const params = {
           skip: prevContext?.skip || 0,
           limit: 50,
         };
         const collections = await this.listCollections(params);
-        return {
-          options: collections.map((collection) => ({
-            label: collection.name || collection.readable_id,
-            value: collection.readable_id,
-          })),
-          context: {
-            skip: params.skip + collections.length,
-          },
-        };
+        const options = collections.map((c) => ({
+          label: c.name || c.readable_id,
+          value: c.readable_id,
+        }));
+        return this._optionsPage(options, params.skip, params.limit);
       },
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2725457 and a01f532.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (1)
  • components/airweave/airweave.app.mjs (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
components/airweave/airweave.app.mjs (1)
components/airweave/actions/search-collection/search-collection.mjs (1)
  • params (56-60)
🔇 Additional comments (2)
components/airweave/airweave.app.mjs (2)

39-41: Code is correct; params.collection is the verified parameter name.

The query parameter named "collection" filters by the collection's readable ID, which matches the implementation in the code.


12-15: Code is correct—no changes needed.

The Airweave SDK methods collections.list and sourceConnections.list both accept skip and limit parameters. The pagination implementation in the code matches the SDK contract exactly.

Comment on lines +93 to +100
_client() {
return new AirweaveSDKClient({
apiKey: this._apiKey(),
baseUrl: this._baseUrl(),
frameworkName: "pipedream",
frameworkVersion: "0.1.0",
});
},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Confirm telemetry/headers are actually set via SDK options.

Check that frameworkName/frameworkVersion propagate to request headers for partner identification. If not, add explicit custom headers if supported.


🌐 Web query:

Does `AirweaveSDKClient` accept `frameworkName` and `frameworkVersion` and forward them as HTTP headers? If not, what option enables setting custom headers?

💡 Result:

I can't find authoritative docs for an "AirweaveSDKClient". Can you share a link (repo or docs) or paste the code/signature you mean? Once I have that I’ll check whether it sends frameworkName/frameworkVersion as headers and — if not — which option lets you add custom headers.



---

🏁 Script executed:

```shell
#!/bin/bash
# Find where AirweaveSDKClient is imported from
echo "=== Searching for AirweaveSDKClient import ==="
rg -n "AirweaveSDKClient" --type=mjs --type=js -B2 -A2

echo ""
echo "=== Checking package.json for airweave dependencies ==="
fd "package.json" | xargs grep -l -i "airweave" 2>/dev/null || echo "No airweave in package.json"

echo ""
echo "=== Full package.json to see all dependencies ==="
find . -maxdepth 2 -name "package.json" -type f | head -1 | xargs cat

Length of output: 1051



---

🏁 Script executed:

```shell
#!/bin/bash
# Search for AirweaveSDKClient without type restriction
echo "=== Searching for AirweaveSDKClient ==="
rg -n "AirweaveSDKClient" -B3 -A3

echo ""
echo "=== Check components/airweave/package.json ==="
cat components/airweave/package.json

echo ""
echo "=== Check imports at top of airweave.app.mjs ==="
head -30 components/airweave/airweave.app.mjs

Length of output: 2348


🌐 Web query:

@airweave/sdk npm frameworkName frameworkVersion headers

💡 Result:

Use the request-level headers option on SDK calls. Example (TS):

await client.collections.create(
  { name: "Example" },
  {
    headers: {
      "X-Framework-Name": "my-framework",
      "X-Framework-Version": "1.2.3",
      // any other headers
      "X-Custom-Header": "value"
    }
  }
);

The SDK docs show the headers request option for adding extra headers, and the API docs list standard headers (e.g., X-API-Key / X-Organization-ID) the backend accepts. [1][2]

Sources:

  • @airweave/sdk README (Additional Headers). [1]
  • Airweave API reference (headers). [2]


---

🏁 Script executed:

```shell
#!/bin/bash
# Find all SDK method calls to see how client is being used
echo "=== SDK method calls in airweave.app.mjs ==="
rg -n "this\._client\(\)" components/airweave/airweave.app.mjs -A5 -B1

echo ""
echo "=== Check for any 'headers' usage in the component ==="
rg -n "headers" components/airweave/airweave.app.mjs

echo ""
echo "=== List all methods that use this._client() ==="
rg -n "this\._client\(\)\." components/airweave/airweave.app.mjs

Length of output: 3343


Add framework telemetry headers to SDK method calls.

The frameworkName and frameworkVersion passed to the constructor are not forwarded as HTTP headers by the SDK. Custom headers must be passed via a request-level headers option on individual SDK calls. Modify each SDK method (lines 104–174) to include framework headers, e.g.:

return await client.collections.list(params, {
  headers: {
    "X-Framework-Name": "pipedream",
    "X-Framework-Version": "0.1.0",
  }
});
🤖 Prompt for AI Agents
In components/airweave/airweave.app.mjs around lines 93–174, the SDK
constructor's frameworkName and frameworkVersion are not automatically sent as
HTTP headers; update each SDK call in the methods between ~104–174 to pass a
request-level headers option that includes "X-Framework-Name": "pipedream" and
"X-Framework-Version": "0.1.0". For every client.* call, add the third-argument
(or second if no params) options object with the headers map, preserving
existing params and options, e.g., call client.method(params, { headers: {
"X-Framework-Name": "pipedream", "X-Framework-Version": "0.1.0" } }) so the
telemetry is forwarded on each request.

Comment on lines +172 to +174
async getSource(shortName) {
const client = this._client();
return await client.sources.read(shortName);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Confirm method name sources.read.

Validate that the SDK exposes client.sources.read(shortName) (not get or retrieve).


🌐 Web query:

Airweave TS SDK Sources API: is the method to fetch a source by short name called `read`, `get`, or something else?

💡 Result:

Use client.sources.get(short_name) for the simple GET /sources/:short_name endpoint. There's also a separate detailed endpoint exposed as read/read_source for GET /sources/detail/:short_name. [1][2]

Sources:

  • GET /sources/:short_name — example: client.sources.get(...). [1]
  • GET /sources/detail/:short_name — example: client.sources.read_source(...). [2]

Change client.sources.read(shortName) to client.sources.get(shortName).

The SDK uses client.sources.get(short_name) for the GET /sources/:short_name endpoint. The method read_source is for a different endpoint.

🤖 Prompt for AI Agents
In components/airweave/airweave.app.mjs around lines 172 to 174, the code calls
client.sources.read(shortName) which is the wrong SDK method for the GET
/sources/:short_name endpoint; change the call to client.sources.get(shortName)
so the correct SDK method is used and return that result (preserve async/await
behavior).

@GTFalcao GTFalcao merged commit 27daacf into PipedreamHQ:master Oct 21, 2025
9 of 10 checks passed
@github-project-automation github-project-automation bot moved this from Ready for Release to Done in Component (Source and Action) Backlog Oct 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

User submitted Submitted by a user

Development

Successfully merging this pull request may close these issues.

6 participants